#ifndef __QG_DRIVER_H
#define __QG_DRIVER_H

#include "ddl.h"


#define		QG_POWER_STATE_PORT		GpioPortA
#define 	     QG_POWER_STATE_PIN		GpioPin8
#define		QG_STATE_PORT			GpioPortB
#define 	     QG_STATE_PIN			GpioPin15
#define        QG_DISPERSE_PORT		GpioPortB
#define        QG_DISPERSE_PIN		GpioPin13

typedef struct QG_Attribute
{
     uint8_t power_state;
     uint8_t state;//1为正在报警，0为未报警
}QG_INFO;

extern QG_INFO QG_info;
void QG_driver_init();

boolean_t QG_getPowerState();

boolean_t QG_getState();

boolean_t QG_setDisperseState(boolean_t state);

uint8_t QG_getStateStart();

void QG_set_low_power(void);

void QG_disperse_init();


#endif


